
package main
 
import (
        "fmt"
        "time"
)
 
func main() {
        var sum int64 = 0
        var startTime int64 = time.Now().UnixNano()
 
        for i := 0; i < 10000000000; i++ {
                sum = sum + int64(i)
        }
 
        var endTime int64 = time.Now().UnixNano()
 
        fmt.Println((endTime - startTime) / 1e6)           // 返回毫秒数
}